package com.mming.sso.util;

import com.mming.sso.bean.ResponseDataWrapper;
import com.mming.sso.bean.ResponseWrapper;

public class ResponseUtil {
    public static ResponseWrapper responseWithData(int status, Object data, String... info) {
        return info.length == 0 ? new ResponseDataWrapper(status, data) :
                new ResponseDataWrapper(status, data, info);
    }

    public static ResponseWrapper response(int status, String... info) {
        return info.length == 0 ? new ResponseWrapper(status) :
                new ResponseWrapper(status, info);
    }
}
